-
Notifications
You must be signed in to change notification settings - Fork 81
[CMAKE] Upgrade to stlport 4.6.2 #1237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
What is the benefit of this? Will it break Retail compatibility? The plan is to abandon STL Port. |
It is only for vc6 and it doesn't break compatibility. It makes vc6 have more standard library features such as the iostreams and improves thread safety and much more. It will reduce the need for a lot of the macros and compat headers needed to make the code work with both vc6 and vc17. |
No mismatch with generals or zero hour All details on the https://discord.com/channels/951133504605917224/1391886820043784282 slack thread |
@tomsons26 Do you have any objections about this change? |
tomsons26:
|
The VC6 compat headers will also be removed when VC6 support is removed. Was there any observed game/tool issue with STLPort 4.5.3 that this change fixes? Or do the STLPort fixes only have a theoretical benefit? Given the criticality of STLPort for compatibility, we need to test this change against a few hundred replays. |
As i mentioned already in the main pr comment, the diff was mainly adding pragmas and the newer version already uses pragma once everywhere. The other changes in the diff were adding commented out code. Other than that there were one or two things that the game code itself doesn't use anymore. The rest of the changes are in the changelogs |
This change could perhaps also sneakily break save games. So that would need to be tested as well. I am concerned about this change. It looks very risky. |
Then test it well (: |
whats the relevance if things that will happen when neither version of stlport well be being used |
I tested this with some replays as well. No mismatches. |
If it doesn't cause mismatches in 99.9% of games then what difference does it make. Plus it only matters if it changes the deterministic output of functions used for game simulation. Stlport was the goto stl implementation at the time. You think they would make a minor release that just breaks so much code without even documenting it. A library update, especially a core c++ library, isn't going to make a change all of a sudden like make push_back() add elements in the middle of the vector. You should only check if floating point functions used by our code potentially have changed in such a significant way that they could be optimized differently |
Yes the floating point functions are the worry. Since so much code is mutated everywhere, it could be the case that 1 math somewhere produces a different result. Do we want to take this risk for 0 benefits? |
It's not 0 benefits. It gives us many more modern features in vc6 and makes the code compile with vc7 and vc8. It allows us to significantly reduce code fragmentatuon. It will reduce our usage of macros and global compat headers for splitting implementations between vc6 code and vc2022. -For example it will give us containers like unordered_map and unordered_set meaning we don't have to use the non standard hash_map anymore.
Making the code less fragmented, more standard, less buggy, easier to debug, more performant, and especially more readable and therefore maintainable are pretty important benefits Potentially being able to upgrade to a newer version of visual studio without breaking compatibility is a pretty big pro. Perhaps we'll be to identify the core compatibility issues and how to mitigate them and we'll be able to upgrade all the way to vs2022 eventually without breaking compatibility |
I will leave it to OmniBlade to decide whether we want to go forward with touching STL Port. I do agree with tomsons26 that we should not source this from sourceforge but have our own copy for it. |
Ominblade already said the following in dev general
|
Will upgrade to 5.2.1 soon but upgrading to 4.6.2 first makes it easier to make the changes needed for stlport 5.2.1 to work such as upgrading from the old c iostreams to the standard iostreams.
No need to apply the diff because the changes the diff made (mostly add pragma once) are already a part of stlport 4.6.2
STLport 4.6.2 / 4.6 Changelog
Changes in 4.6.2 since 4.6.1
threads.h:447
: Fixed _NOTHREADS compilation error (thanks Wu Yongwei)stl_solaris.h
: Fixed pthreads compilation errorstl_msvc.h
: Added#define _STLP_HAS_SPECIFIC_PROLOG_EPILOG
for VC7.1locale_impl.cpp
: Fixedlocale::classic()
initializationChanges in 4.6 since 4.5.3
string::reserve
(thanks Marc)_thread.c
,_thread.h
: Merged thread redesign from CVS (thanks Petr Ovchenkov)iostream.cpp
,locale_impl.cpp
: Static initialization made robust for dynamic loader circular dependencies (thanks Alexey Sarytchev)_function.h
: New workaround formem_fun_*
family for compilers with return void bug (thanks Pavel Kuznetsov)stl_solaris.h
: v8plus compilation fix (thanks Mukesh Kapoor)num_put_float.cpp
: FreeBSD fix_construct.h
: Fixed case for compilers with default integer constructor bugfstream.cpp
: Text file stream position bug correction (thanks Christopher Kohlert)_num_put.c
: Correction of display of min 64-bit signed integer values, e.g.numeric_limits<__int64>::min()
on WIN32 (thanks Anders Dalvander)_num_put.c
: Add '+' sign for unsigned integer display (thanks Francois Dumont)debug
: Many missing iterator invalidation corrected (thanks Detlev V.Davidson and Francois Dumont)_new.h
: New config compiler switch for those that definebad_alloc
but do not throw it! (thanks ?)_new.h
: Changedclass nothrow_t
tostruct nothrow_t
(thanks Francois Dumont)_bvector.h
: Added|=
and&=
operators to_Bit_reference
struct (thanks Ed Rice)type_traits.h
fixed (thanks Francois Dumont)stl_sunpro.h
: Fixedmbstate
definition for SUN 4.2 (thanks lengzq)complex.cpp
,_complex.h
:template<>
used for specializations_num_put.c
: Removed unused locale variable (thanks Petr Ovchenkov)_algo.h
:__reverse
beautified (thanks Kabanov)dll_main.cpp
:force_link()
forced to be linked instl_msvc.h
: Config changes for .NET_auto_ptr.h
: "struct" changed to "class"_istream.c
:M_read_unbuffered
fixed (thanks Stefan Schwarzer)stl_gcc.h
: Added missing inclusion for SCO platform (thanks Emmanuel Soden)_tree.c
: Optimizedinsert_unique
(thanks Timothy)_algo.c
: Relaxed type requirements forlower_bound
,upper_bound
,binary_search
_algo.h
:adjacent_find()
expressed with compare-function flavorcpp_runtime/typeinfo
: Adjustments for .NET (thanks Daniel)cstd/cassert
: Guard removed (thanks Evan Cheng)TODO